package ClassData;

import ClassData.Visitor.IVisitor;
import ClassData.Visitor.IVisitorElement;

public class ConstantPoolMethod_Info  extends ConstantPoolInfo implements IVisitorElement {

	short name_index;
	short descriptor_index;

	String parameterTypesAsString;
	
	public ConstantPoolMethod_Info(short NameIndex,short DescriptorIndex) {
		name_index=NameIndex;
		descriptor_index=	DescriptorIndex;
	}

	public short getNameIndex() {
		return(name_index);
	}

	public short getDescriptorIndex() {
		return(descriptor_index);
	}

	/**
	 * returns type of this constant pool entry
	 * 
	 */	
	public int getType() {
		return(CONSTANT_Methodref);
	}

	public void setParametersAsString(String parameters) {
		parameterTypesAsString=parameters;
	}

	public String getParametersAsString() {
		return(parameterTypesAsString);
	}
	
	@Override
	public void receive_Visitor(IVisitor visitor) {
		visitor.visit_ConstantPoolMethod_Info(this);
	}
	
}
